<?php

/* @var $this yii\web\View */

$this->title = '综合管理系统';
use yii\helpers\Html; 
?>
<div class="site-index">
<!-- Morris.js charts -->
<?= Html::jsFile('@web/js/jquery-2.2.3.min.js') ?>
<script src="https://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>
<?= Html::cssFile('@web/js/morris.css') ?>
<?= Html::jsFile('@web/js/morris.js') ?>
<?= Html::jsFile('@web/js/morris.min.js') ?>
<?= Html::jsFile('@web/js/Chart.min.js') ?>	
<!-- jQuery UI 1.11.4 -->
<script src="https://code.jquery.com/ui/1.11.4/jquery-ui.min.js"></script>
<!-- Main content -->
<section class="content">

              <!-- 快捷方式  -->
              <div class="box box-solid" >
                <div class="box-header">
                  <i class="fa fa-th"></i>
                  <h3 class="box-title" style="color:#000;">快捷方式</h3>
                  <div class="box-tools pull-right">
                    <button class="btn bg-teal btn-sm" data-widget="collapse"><i class="fa fa-minus"></i></button>
                    <!-- <button class="btn bg-teal btn-sm" data-widget="remove"><i class="fa fa-times"></i></button> -->
                  </div>
                </div>
                <div class="box-body border-radius-none">
                  <div class="chart" style="height: 150px;color:#000;">

			<!-- small box -->
           <style>
		   a{ color:#fff; text-decoration:none;}
		   .inner p {padding:2px 0 0 5px;}
		   .inner h4 {font-size:24px;padding:10px 0 0 5px;}
		   </style>
      <div class="row">
        <div class="col-lg-3 col-xs-6">
          <!-- small box -->
          <div class="small-box" style="background-color:#3c8dbc;">
            <div class="inner">
              <h4 style="color:#fff;">内容管理</h4>

              <p style="color:#fff;">Content management</p>
            </div>
            <div class="icon">
              <i class="ion ion-pie-graph"></i>
            </div>
            <a href="/category/index" class="small-box-footer">ENTER <i class="fa fa-arrow-circle-right"></i></a>
          </div>
        </div>
        <!-- ./col -->
        <div class="col-lg-3 col-xs-6">
          <!-- small box -->
          <div class="small-box" style="background-color:#3c8dbc;">
            <div class="inner">
              <h4 style="color:#fff;">会员管理</h4>

              <p style="color:#fff;">Member management</p>
            </div>
            <div class="icon">
              <i class="ion ion-person-add"></i>
            </div>
            <a href="/member/index" class="small-box-footer">ENTER <i class="fa fa-arrow-circle-right"></i></a>
          </div>
        </div>
        <!-- ./col -->
        <div class="col-lg-3 col-xs-6">
          <!-- small box -->
          <div class="small-box" style="background-color:#3c8dbc;">
            <div class="inner">
              <h4 style="color:#fff;">财务管理</h4>

              <p style="color:#fff;">Financial management</p>
            </div>
            <div class="icon">
              <i class="ion ion-stats-bars"></i>
            </div>
            <a href="/backend/finanactive" class="small-box-footer">ENTER <i class="fa fa-arrow-circle-right"></i></a>
          </div>
        </div>
        <!-- ./col -->
        <div class="col-lg-3 col-xs-6">
          <!-- small box -->
          <div class="small-box"  style="background-color:#3c8dbc;">
            <div class="inner">
              <h4 style="color:#fff;">系统管理</h4>

              <p style="color:#fff;">System management</p>
            </div>
            <div class="icon">
              <i class="fa fa-fw fa-bars"></i>
            </div>
            <a href="/setting/index" class="small-box-footer">ENTER <i class="fa fa-arrow-circle-right"></i></a>
          </div>
        </div>
        <!-- ./col -->
      </div>
			 <!-- small box end -->
				  
				  </div>
                </div>
              </div>
              <!-- 快捷方式 END -->

			    <div class="box box-solid" >
                <div class="box-header">
                  <i class="fa fa-th"></i>
				   <h3 class="box-title" style="color:#000;">会员统计图</h3>
				   <span style="dispaly:block;padding-left:8px;"><a style="font-size:15px;color:#3c8dbc; font-weight:bold;" href="/member/import">数据导出</a></span>
                  <div class="box-tools pull-right">
                    <button class="btn bg-teal btn-sm" data-widget="collapse"><i class="fa fa-minus"></i></button>
                  </div>
                </div>
                <div class="box-body border-radius-none">


        <!-- Left col -->
        <section class="col-lg-7 connectedSortable ui-sortable" style="width:70%">
          <!-- Custom tabs (Charts with tabs)-->
          <div class="nav-tabs-custom">
            <!-- Tabs within a box -->
            <ul class="nav nav-tabs pull-right">
              <li class="pull-left header"><i class="fa fa-inbox"></i><?php echo $year;?>年趋势(单位：人)</li>
            </ul>
            <div class="tab-content no-padding">
              <!-- Morris chart - Sales -->
              <div class="chart tab-pane active" id="revenue-chart" style="position: relative; height: 300px;"></div>
            </div>
          </div>

        </section>
		
		 <section class="col-lg-7 connectedSortable ui-sortable" style="width:30%">
          <div class="box box-default">
            <div class="box-header with-border">
              <h3 class="box-title">会员地域分布</h3>

              <div class="box-tools pull-right">
                <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
                </button>
                <button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
              </div>
            </div>
            <div class="box-body">
              <div class="row" style="margin-left:55px;">
                <div class="col-md-8">
                  <div class="chart-responsive">
                    <canvas id="lineChart" height="350"></canvas>
                  </div>
                </div>
              </div>
            </div>
          </div>
		</section>
        </div>
        </div>
		
	<div class="box box-solid" >
        <div class="box-header">
          <i class="fa fa-th"></i>
		   <h3 class="box-title" style="color:#000;">财统计图</h3>
		   <span style="dispaly:block;padding-left:8px;"><a style="font-size:15px;color:#3c8dbc; font-weight:bold;" href="/orders/import">数据导出</a></span>
          <div class="box-tools pull-right">
            <button class="btn bg-teal btn-sm" data-widget="collapse"><i class="fa fa-minus"></i></button>
          </div>
        </div>
        <div class="box-body border-radius-none">

        <!-- Left col -->
        <section class="col-lg-7 connectedSortable ui-sortable" style="width:100%">
          <!-- Custom tabs (Charts with tabs)-->
          <div class="nav-tabs-custom">
            <!-- Tabs within a box -->
            <ul class="nav nav-tabs pull-right">
              <li class="pull-left header"><i class="fa fa-inbox"></i>缴费趋势(单位：元)</li>
            </ul>
            <div class="tab-content no-padding">
              <!-- Morris chart - Sales -->
              <div class="chart tab-pane active" id="caiwu-chart" style="position: relative; height: 300px;"></div>
            </div>
          </div>

        </section>
		
        </div>
    </div>


</section>
<script>
  /* Morris.js Charts */
  // Sales chart
  var area = new Morris.Line({
    element: 'revenue-chart',
    data: [
		<?php echo $data; ?>
    ],
    xkey: 'month',
    ykeys: ['value'],
    labels: ['Item 1'],
    //lineColors: ['#a0d0e0'],
	parseTime:false
  });
  
  //账务
  var area = new Morris.Line({
    element: 'caiwu-chart',
    data: [
		<?php echo $caiwu; ?>
    ],
    xkey: 'year',
    ykeys: ['value'],
    labels: ['Item 1'],
    //lineColors: ['#a0d0e0'],
	parseTime:false
  });

	//饼图
  var pieChartCanvas = $("#lineChart").get(0).getContext("2d");

  var pieChart = new Chart(pieChartCanvas);
  var PieData = [
	<?php echo $area; ?>
  ];
   var pieOptions = {
     segmentShowStroke: true,
     segmentStrokeColor: "#fff",
     segmentStrokeWidth: 2,
     percentageInnerCutout: 50,
     animationSteps: 10,
     animationEasing: "easeOutBounce",
     animateRotate: true,
     animateScale: false,
     responsive: true,
     maintainAspectRatio: true,
   };
   pieChart.Doughnut(PieData, pieOptions);
</script>
</div>
<?php  ?>